/**
 * Created by MD-3 on 2017/5/25.
 */
var initmap_mock = {
    centerLng: 114.39599,
    centerLat: 30.492056,
    centerZoom: 15,
    address: "洪山区",
};

var resource_mock = {
    IMG_CENTER: "/assets/map/images/center.png",
    IMG_MARKER_TYPE0: "/assets/map/images/marker.png",
    IMG_MARKER_TYPE1: "/assets/map/images/mbg_v1.2-fs8.png",
    IMG_ALARM_OFF: "/assets/map/images/speaker32.png",
    IMG_ALARM_ON: "/assets/map/images/speaker32_1.png"
}

var strokeColor_mock = {
    COLOR0: '#FF0000',
    COLOR1: '#FFA500',
    COLOR2: '#008000',
    COLOR3: '#0000FF',
    COLOR4: '#DA70D6',
    COLOR5: '#8B0000',
    COLOR6: '#00008B',
    COLOR7: '#006400',
    COLOR8: '#800080',
    COLOR9: '#5F9EA0',
    COLOR10: '#FA8072'
}

var config_mock = {
    ALARM_CHECK : "报警处理",
    ALARM_CONFIRM : "确认",
}


/*
 workState:     0-正常，  1-异常，    2-故障
 alarmState:    0-未报警，1-正在报警，2-已报警
 updateState:   0-待升级，1-正在升级，2-升级完成
 */
var deviceList_mock = [{
    id: '0001',
    type: '0',                     //0-中继，1-终端
    name: '中南民大',
    position: {lng: '114.391484', lat: '30.48756'},
    radius: 0,
    workState: '0',
    alarmState: '0',
    updateState: '0',
    preDeviceId: ''                  //上一级id
}, {
    id: '1001',
    type: '1',
    name: '16号教学楼',
    position: {lng: '114.39569', lat: '30.492775'},
    radius: 300,
    workState: '0',
    alarmState: '0',
    updateState: '0',
    preDeviceId: '0001'
}, {
    id: '1002',
    type: '1',
    name: '洪山高中',
    position: {lng: '114.387676', lat: '30.489973'},
    radius: 200,
    workState: '1',
    alarmState: '1',
    updateState: '0',
    preDeviceId: '0001'
}, {
    id: '1003',
    type: '1',
    name: '南湖大道',
    position: {lng: '114.384242', lat: '30.479211'},
    radius: 500,
    workState: '0',
    alarmState: '0',
    updateState: '0',
    preDeviceId: '0001'
}, {
    id: '0002',
    type: '0',
    name: '武汉纺大',
    position: {lng: '114.398651', lat: '30.485915'},
    radius: 0,
    workState: '0',
    alarmState: '0',
    updateState: '0',
    preDeviceId: ''
}, {
    id: '2001',
    type: '1',
    name: '综合楼',
    position: {lng: '114.397095', lat: '30.48622'},
    radius: 100,
    workState: '0',
    alarmState: '0',
    updateState: '0',
    preDeviceId: '0002'
}, {
    id: '2002',
    type: '1',
    name: '小湖',
    position: {lng: '114.396698', lat: '30.484639'},
    radius: 100,
    workState: '1',
    alarmState: '2',
    updateState: '0',
    preDeviceId: '0002'
}, {
    id: '2003',
    type: '1',
    name: '操场',
    position: {lng: '114.400904', lat: '30.486146'},
    radius: 100,
    workState: '0',
    alarmState: '1',
    updateState: '1',
    preDeviceId: '0002'
}];


//报警列表
var alarmList_mock = [{
    id: '1002',
    name: '洪山高中',
    position: {lng: '114.387676', lat: '30.489973'},
    alarmId: '001',
    alarmTime: '6/1 7:00',
    alarmState: '1',
    alarmType: '',
    audioUrl: "./media/TheDawn.mp3",
}, {
    id: '2003',
    name: '操场',
    position: {lng: '114.400904', lat: '30.486146'},
    alarmId: '002',
    alarmTime: '6/1 11:00',
    alarmState: '1',
    alarmType: '',
    audioUrl: "",
}, {
    id: '2002',
    name: '小湖',
    position: {lng: '114.396698', lat: '30.484639'},
    alarmId: '003',
    alarmTime: '6/1 16:00',
    alarmState: '2',
    alarmType: '设备报警',
    audioUrl: "./media/TheDawn.mp3",
}, {
    id: '2002',
    name: '小湖',
    position: {lng: '114.396698', lat: '30.484639'},
    alarmId: '004',
    alarmTime: '6/1 17:00',
    alarmState: '2',
    alarmType: '监控报警',
    audioUrl: "",
}, {
    id: '2002',
    name: '小湖',
    position: {lng: '114.396698', lat: '30.484639'},
    alarmId: '005',
    alarmTime: '6/1 18:00',
    alarmState: '2',
    alarmType: '设备报警',
    audioUrl: ""
}
]

//模拟报警
var alarm_mock = {
    id: '2002',
    name: '小湖',
    alarmId: '008',
    alarmTime: "2017-05-27 11:22",
    alarmState: '1',
    alarmType: '',
    audioUrl: "./media/TheDawn.mp3"
}

var infoWinow_mock = {
    thead: ['基本信息', '报警显示', '设备状态', '设备配置'],
    basicInfo: {
        deviceId: '2002',
        productId: 'MEI0001',
        productor: '大华',
        productVersion: 'v1.2',
        installer: 'zhangsan',
        installTime: '2017-05-22',
        installPosition: '小湖',
        installArea: '第一墓区',
        installPreDevice: '武汉纺大'
    },
    alarmInfo: [{
        id: '2002',
        name: '小湖',
        alarmId: '008',
        alarmTime: "2017-05-27 11:22",
        alarmState: '1',
        alarmType: '',
        audioUrl: "./media/TheDawn.mp3"
    },{
        id: '2002',
        name: '小湖',
        alarmId: '007',
        alarmTime: "2017-05-27 16:22",
        alarmState: '2',
        alarmType: '监控报警',
        audioUrl: ""
    }],
    devicestate: {
        workState: '0',
        updateState: '1',
        netType: '4G',
        netState: '连接良好',
        power: '80'
    },
    deviceconfig: {
        configMode: '白天模式',
        lastAlarmTime: '2017-05-28 15:00:00',
        lastUpdateTime: '2017-05-22 01:00:00'
    }
}


var mngWindow_mock = {
    unitName: '地波项目',
}